 
import echarts from 'echarts';
// 引入柱状图
import 'echarts/lib/chart/bar';
// 引入提示框和标题组件
import 'echarts/lib/component/tooltip';
import 'echarts/lib/component/title';

function statisticAnalyzeCtrl($log, $http, $scope, $timeout, cfpLoadingBar) {
  'ngInject';
  $log.log('statisticAnalyzeCtrl init');
  this.header = false;
  this.bodyer = false;
  
  // 年 季度 月
  this.smonth=true;
  this.squarter=false;
  this.syear=true;
  this.smonths = () => {
    if (this.smonth === true) {
      this.smonth=false;
      this.squarter=true;
      this.syear=true;
      console.log(1);
    }
  };
  this.squarters = () => {
    if (this.squarter === true) {
      this.squarter=false;
      this.smonth=true;
      this.syear=true;
    }
  };
  this.syears = () => {
    if (this.syear === true) {
      this.syear = false;
      this.smonth=true;
      this.squarter=true;
    }
  };

  this.footer = false;
  // 专项考核得分柱状图
  setTimeout(function() {
        let option = {
          color: ['#6dcbe4'],
          title : {
            text: '各个任务月得分情况',
            x:'center',
            textStyle: {color: '#666'}
          },
          tooltip : {
            trigger: 'axis'
          },
          legend: {
            left:30,
            top:20,
            data:['得分情况']
          },
          toolbox: {
            show : true,
            feature : {
              dataView : {show: true, readOnly: false},
              magicType : {show: true, type: ['line', 'bar']},
              restore : {show: true},
              saveAsImage : {show: true}
            }
          },
          calculable : true,
          xAxis : [
            {
              type : 'category',
              data : ['任务一','任务二','任务三','任务四','任务五','任务六']
            }
          ],
          yAxis : [
            {
              type : 'value',
            }
          ],
          series : [
            {
              name:'得分情况',
              type:'bar',
              data:[80, 90, 87, 48, 67, 93],
              barWidth : 30,
              markPoint : {
                data : [
                  {type : 'max', name: '最大值'},
                  {type : 'min', name: '最小值'}
                ]
              },
              markLine : {
                data : [
                  {type : 'average', name: '平均值'}
                ]
              }
            }
          ]
        };
        let myChart = echarts.init(document.getElementById('special-examination-score'));
        myChart.setOption(option);
      }, 500);

  // 任务月得分占比饼状图
  $timeout(function() {
      var option = {
        tooltip : {
          trigger: 'item',
          formatter: "{a} <br/>{b} : {c} ({d}%)"
        },
        title : {
          text: '各个任务月得分占比情况',
          x:'center',
          textStyle: {color: '#666'}
        },
        color: ['#fe6f4d', '#fdc638', '#2de88e', '#a8a8a8', '#44cede', '#299be4'],
        legend: {
          top:40,
          data: ['任务一','任务二','任务三','任务四','任务五','任务六']
        },
        toolbox: {
          show : true,
          feature : {
            dataView : {show: true, readOnly: false},
            magicType : {show: true, type: ['line', 'bar']},
            restore : {show: true},
            saveAsImage : {show: true}
          }
        },
        calculable : true,
        series : [
          {
            name:'得分占比',
            type: 'pie',
            radius: ['35%', '55%'],
            center: ['50%', '60%'],
            data:[
              {value:335, name:'任务一'},
              {value:310, name:'任务二'},
              {value:234, name:'任务三'},
              {value:135, name:'任务四'},
              {value:1548, name:'任务五'},
              {value:869, name:'任务六'}
            ],
            itemStyle: {
              emphasis: {
                shadowBlur: 10,
                shadowOffsetX: 0,
                shadowColor: 'rgba(0, 0, 0, 0.5)'
              }
            }
          }
        ]
      };
      let myChart = echarts.init(document.getElementById('task-in-proportion'));
      myChart.setOption(option);
    }, 500);


  // 各个安全员得分情况 折线图
  $timeout(function() {
      var myChart = echarts.init(document.getElementById('security-score'));
      var option = {
        title: {
          text: '各个安全员得分情况',
          x:'center',
          textStyle: {color: '#666'}
        },
        tooltip: {
          trigger: 'axis'
        },
        legend: {
          data:['安全员一','安全员二','安全员三','安全员四','安全员五','安全员六'],
          top: 30,
          right: 5,
        },
        grid: {
          left: '3%',
          right: '4%',
          bottom: '3%',
          containLabel: true
        },
        toolbox: {
          show : true,
          feature : {
            dataView : {show: true, readOnly: false},
            magicType : {show: true, type: ['line', 'bar']},
            restore : {show: true},
            saveAsImage : {show: true}
          }
        },
        calculable : true,
        xAxis: {
          type: 'category',
          boundaryGap: false,
          data: ['任务一','任务二','任务三','任务四','任务五','任务六']
        },
        yAxis: {
          type: 'value'
        },
        series: [
          {
            name:'安全员一',
            type:'line',
            stack: '总量',
            data:[120, 132, 101, 134, 90, 230]
          },
          {
            name:'安全员二',
            type:'line',
            stack: '总量',
            data:[220, 182, 191, 234, 290, 330]
          },
          {
            name:'安全员三',
            type:'line',
            stack: '总量',
            data:[150, 232, 201, 154, 190, 330]
          },
          {
            name:'安全员四',
            type:'line',
            stack: '总量',
            data:[320, 332, 301, 334, 390, 330]
          },
          {
            name:'安全员五',
            type:'line',
            stack: '总量',
            data:[340, 432, 321, 374, 360, 320]
          },
          {
            name:'安全员六',
            type:'line',
            stack: '总量',
            data:[320, 352, 401, 304, 340, 370]
          }
        ]
      };
      myChart.setOption(option);
    }, 500);

  // 各个任务中安全员得分情况 饼状图
  $timeout(function() {
    var option = {
      tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      color: ['#fe6f4d', '#fdc638', '#2de88e', '#a8a8a8', '#44cede', '#299be4'],
      legend: {
        top:20,
        data: ['任务一','任务二','任务三','任务四','任务五','任务六']
      },
      series : [
        {
          name:'得分占比',
          type: 'pie',
          radius: ['35%', '55%'],
          center: ['50%', '60%'],
          data:[
            {value:335, name:'任务一'},
            {value:310, name:'任务二'},
            {value:234, name:'任务三'},
            {value:135, name:'任务四'},
            {value:1548, name:'任务五'},
            {value:869, name:'任务六'}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('task-score'));
    myChart.setOption(option);
  }, 500);

// 各个任务中安全员得分情况 子 饼状图
  $timeout(function() {
    var option = {
      tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      color: ['#fe6f4d', '#fdc638'],
      legend: {
        top:40,
        data: ['安全人员一','安全人员二']
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      series : [
        {
          name:'得分占比',
          type: 'pie',
          radius: ['25%', '40%'],
          center: ['50%', '60%'],
          data:[
            {value:335, name:'安全人员一'},
            {value:310, name:'安全人员二'}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('task-score-son'));
    myChart.setOption(option);
  }, 500);

  // 日常巡查各个安全员巡查情况 柱状图
  setTimeout(function() {
    let option = {
      color: ['#fe7d5d','#6dcce3'],
      title : {
        text: '日常巡查次数月情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      tooltip : {
        trigger: 'axis'
      },
      legend: {
        data:['日常巡查','重点巡查'],
        left:20,
        top:20
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      xAxis : [
        {
          type : 'category',
          data : ['安全员一','安全员二','安全员三','安全员四','安全员五','安全员六']
        }
      ],
      yAxis : [
        {
          type : 'value',
        }
      ],
      series : [
        {
          name:'重点巡查',
          type:'bar',
          stack: '全部',
          barWidth : 30,
          data:[150, 232, 201, 154, 190, 330]
        },
        {
          name:'日常巡查',
          type:'bar',
          stack: '全部',
          barWidth : 30,
          data:[120, 132, 101, 134, 90, 230],
          markPoint : {
            data : [
              {type : 'max', name: '最大值'},
              {type : 'min', name: '最小值'}
            ]
          },
          markLine : {
            data : [
              {type : 'average', name: '平均值'}
            ]
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('routine-inspections'));
    myChart.setOption(option);
  }, 500);

  // 各个安全员日常巡查占比情况 饼状图
  $timeout(function() {
    var option = {
      tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      title : {
        text: '各个安全员日常巡查占比情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      color: ['#fe6f4d', '#fdc638', '#2de88e', '#a8a8a8', '#44cede', '#299be4'],
      legend: {
        top:40,
        data: ['任务一','任务二','任务三','任务四','任务五','任务六']
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      series : [
        {
          name:'得分占比',
          type: 'pie',
          radius: ['35%', '55%'],
          center: ['50%', '60%'],
          data:[
            {value:335, name:'任务一'},
            {value:310, name:'任务二'},
            {value:234, name:'任务三'},
            {value:135, name:'任务四'},
            {value:1548, name:'任务五'},
            {value:869, name:'任务六'}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('routine-inspections-accounted'));
    myChart.setOption(option);
  }, 500);

  // 日常重点巡查占比情况 饼状图
  $timeout(function() {
    var option = {
      tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      color: ['#fe6f4d', '#fdc638', '#2de88e', '#a8a8a8', '#44cede', '#299be4'],
      legend: {
        top:40,
        data: ['任务一','任务二','任务三','任务四','任务五','任务六']
      },
      series : [
        {
          name:'得分占比',
          type: 'pie',
          radius: ['35%', '55%'],
          center: ['50%', '60%'],
          data:[
            {value:335, name:'任务一'},
            {value:310, name:'任务二'},
            {value:234, name:'任务三'},
            {value:135, name:'任务四'},
            {value:1548, name:'任务五'},
            {value:869, name:'任务六'}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('important-patrol'));
    myChart.setOption(option);
  }, 500);

// 日常重点巡查占比情况 子 饼状图
  $timeout(function() {
    var option = {
      tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      color: ['#fe6f4d', '#fdc638'],
      legend: {
        top:40,
        data: ['安全人员一','安全人员二']
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      series : [
        {
          name:'得分占比',
          type: 'pie',
          radius: ['25%', '40%'],
          center: ['50%', '60%'],
          data:[
            {value:335, name:'安全人员一'},
            {value:310, name:'安全人员二'}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('important-patrol-son'));
    myChart.setOption(option);
  }, 500);

  // 人员进出场情况 柱状图
  setTimeout(function() {
    let option = {
      color: ['#fa8b75','#59b0e7','#7cc78a'],
      title : {
        text: '人员进出场情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      tooltip : {
        trigger: 'axis'
      },
      legend: {
        top:30,
        data:['进场','在场','离场']
      },

      xAxis : [
        {
          show:false,
          type : 'value'
        }
      ],
      yAxis : [
        {
          show:false,
          type : 'category',
          data : ['']
        }
      ],
      series : [
        {
          name:'进场',
          type:'bar',
          stack: '总量',
          itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
          data:[50]
        },
        {
          name:'在场',
          type:'bar',
          stack: '总量',
          itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
          data:[361]
        },
        {
          name:'离场',
          type:'bar',
          stack: '总量',
          itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
          data:[35]
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('personnel-situation'));
    myChart.setOption(option);
  }, 500);

// 机械设备进出场情况 柱状图
  setTimeout(function() {
    let option = {
      color: ['#fa8b75','#59b0e7','#7cc78a'],
      title : {
        text: '机械设备进出场情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      tooltip : {
        trigger: 'axis'
      },
      legend: {
        top:30,
        data:['进场','在场','离场']
      },

      xAxis : [
        {
          show:false,
          type : 'value'
        }
      ],
      yAxis : [
        {
          show:false,
          type : 'category',
          data : ['']
        }
      ],
      series : [
        {
          name:'进场',
          type:'bar',
          stack: '总量',
          itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
          data:[50]
        },
        {
          name:'在场',
          type:'bar',
          stack: '总量',
          itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
          data:[361]
        },
        {
          name:'离场',
          type:'bar',
          stack: '总量',
          itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
          data:[35]
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('mechanical-situation'));
    myChart.setOption(option);
  }, 500);



  // 专项考核得分0 柱状图
  setTimeout(function() {
    let option = {
      color: ['#6dcbe4'],
      title : {
        text: '各个任务月得分情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      tooltip : {
        trigger: 'axis'
      },
      legend: {
        left: 'left',
        data:['得分情况']
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      xAxis : [
        {
          type : 'category',
          data : ['任务一','任务二','任务三','任务四','任务五','任务六']
        }
      ],
      yAxis : [
        {
          type : 'value',
        }
      ],
      series : [
        {
          name:'得分情况',
          type:'bar',
          data:[80, 90, 87, 48, 67, 93],
          barWidth : 30,
          markPoint : {
            data : [
              {type : 'max', name: '最大值'},
              {type : 'min', name: '最小值'}
            ]
          },
          markLine : {
            data : [
              {type : 'average', name: '平均值'}
            ]
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('special-examination-score0'));
    myChart.setOption(option);
  }, 500);

  // 任务月得分占比0 饼状图
  $timeout(function() {
    var option = {
      tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      title : {
        text: '各个任务月得分占比情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      color: ['#fe6f4d', '#fdc638', '#2de88e', '#a8a8a8', '#44cede', '#299be4'],
      legend: {
        top:40,
        data: ['任务一','任务二','任务三','任务四','任务五','任务六']
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      series : [
        {
          name:'得分占比',
          type: 'pie',
          radius: ['35%', '55%'],
          center: ['50%', '60%'],
          data:[
            {value:335, name:'任务一'},
            {value:310, name:'任务二'},
            {value:234, name:'任务三'},
            {value:135, name:'任务四'},
            {value:1548, name:'任务五'},
            {value:869, name:'任务六'}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('task-in-proportion0'));
    myChart.setOption(option);
  }, 500);

  // 日常巡查巡查情况
  setTimeout(function() {
    let option = {
      color: ['#fe7d5d','#6dcce3'],
      title : {
        text: '安全员每天日常巡查次数情况表',
        x:'center',
        textStyle: {color: '#666'}
      },
      tooltip : {
        trigger: 'axis'
      },
      legend: {
        top :20,
        data:['日常巡查','重点巡查'],
        x:"left"
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      xAxis : [
        {
          type : 'category',
          data : ['1','2','3','4','5','6']
        }
      ],
      yAxis : [
        {
          type : 'value',
        }
      ],
      series : [
        {
          name:'重点巡查',
          type:'bar',
          stack: '全部',
          barWidth : 30,
          data:[150, 232, 201, 154, 190, 330]
        },
        {
          name:'日常巡查',
          type:'bar',
          stack: '全部',
          barWidth : 30,
          data:[120, 132, 101, 134, 90, 230],
          markPoint : {
            data : [
              {type : 'max', name: '最大值'},
              {type : 'min', name: '最小值'}
            ]
          },
          markLine : {
            data : [
              {type : 'average', name: '平均值'}
            ]
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('routine-inspections0'));
    myChart.setOption(option);
  }, 500);

  // 各个重点巡查月次数情况
  setTimeout(function() {
    let option = {
      color: ['#fea04d'],
      title : {
        text: '各个重点巡查月次数情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      tooltip : {
        trigger: 'axis'
      },
      legend: {
        left: 'left',
        top:25,
        data:['重点日常巡查次数']
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      xAxis : [
        {
          type : 'category',
          data : ['重点一','重点二','重点三','重点四','重点五','重点六']
        }
      ],
      yAxis : [
        {
          type : 'value'
        }
      ],
      series : [
        {
          name:'重点日常巡查次数',
          type:'bar',
          barWidth : 30,
          data:[80, 90, 87, 48, 67, 93],
          markPoint : {
            data : [
              {type : 'max', name: '最大值'},
              {type : 'min', name: '最小值'}
            ]
          },
          markLine : {
            data : [
              {type : 'average', name: '平均值'}
            ]
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('key-patrol-number'));
    myChart.setOption(option);
  }, 500);

  // 人员进出场情况0 柱状图
  setTimeout(function() {
    let option = {
      color: ['#fa8b75','#59b0e7','#7cc78a'],
      title : {
        text: '人员进出场情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      tooltip : {
        trigger: 'axis'
      },
      legend: {
        top:30,
        data:['进场','在场','离场']
      },

      xAxis : [
        {
          show:false,
          type : 'value'
        }
      ],
      yAxis : [
        {
          show:false,
          type : 'category',
          data : ['']
        }
      ],
      series : [
        {
          name:'进场',
          type:'bar',
          stack: '总量',
          itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
          data:[50]
        },
        {
          name:'在场',
          type:'bar',
          stack: '总量',
          itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
          data:[361]
        },
        {
          name:'离场',
          type:'bar',
          stack: '总量',
          itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
          data:[35]
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('personnel-situation0'));
    myChart.setOption(option);
  }, 500);

// 机械设备进出场情况0
  setTimeout(function() {
    let option = {
      color: ['#fa8b75','#59b0e7','#7cc78a'],
      title : {
        text: '机械设备进出场情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      tooltip : {
        trigger: 'axis'
      },
      legend: {
        top:30,
        data:['进场','在场','离场']
      },

      xAxis : [
        {
          show:false,
          type : 'value'
        }
      ],
      yAxis : [
        {
          show:false,
          type : 'category',
          data : ['']
        }
      ],
      series : [
        {
          name:'进场',
          type:'bar',
          stack: '总量',
          itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
          data:[50]
        },
        {
          name:'在场',
          type:'bar',
          stack: '总量',
          itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
          data:[361]
        },
        {
          name:'离场',
          type:'bar',
          stack: '总量',
          itemStyle : { normal: {label : {show: true, position: 'insideRight'}}},
          data:[35]
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('mechanical-situation0'));
    myChart.setOption(option);
  }, 500);


  // 各个项目部得分情况 柱状图
  setTimeout(function() {
    let option = {
      color: ['#6dcbe4'],
      title : {
        text: '各个项目部月得分情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      tooltip : {
        trigger: 'axis'
      },
      legend: {
        left:20,
        top:20,
        data:['得分情况']
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      xAxis : [
        {
          type : 'category',
          data : ['项目一','项目二','项目三','项目四','项目五','项目六']
        }
      ],
      yAxis : [
        {
          type : 'value',
        }
      ],
      series : [
        {
          name:'得分情况',
          type:'bar',
          barWidth : 30,
          data:[80, 90, 87, 48, 67, 93],
          markPoint : {
            data : [
              {type : 'max', name: '最大值'},
              {type : 'min', name: '最小值'}
            ]
          },
          markLine : {
            data : [
              {type : 'average', name: '平均值'}
            ]
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('special-examination-score1'));
    myChart.setOption(option);
  }, 500);

  // 各个项目部得分占比项目 饼状图
  $timeout(function() {
    var option = {
      tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      title : {
        text: '各个项目部得分占比情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      color: ['#fe6f4d', '#fdc638', '#2de88e', '#a8a8a8', '#44cede', '#299be4'],
      legend: {
        top:40,
        data: ['项目一','项目二','项目三','项目四','项目五','项目六']
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      series : [
        {
          name:'得分占比',
          type: 'pie',
          radius: ['35%', '55%'],
          center: ['50%', '60%'],
          data:[
            {value:335, name:'项目一'},
            {value:310, name:'项目二'},
            {value:234, name:'项目三'},
            {value:135, name:'项目四'},
            {value:1548, name:'项目五'},
            {value:869, name:'项目六'}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('task-in-proportion1'));
    myChart.setOption(option);
  }, 500);

  // 各个项目部任务得分情况 折线图
  $timeout(function() {
    var myChart = echarts.init(document.getElementById('project-department'));
    var option = {
      title: {
        text: '各个项目部月任务得分情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      tooltip: {
        trigger: 'axis'
      },
      legend: {
        data:['项目一','项目二','项目三','项目四','项目五','项目六'],
        top: 30,
        right: 5,
      },
      grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['任务一','任务二','任务三','任务四','任务五','任务六']
      },
      yAxis: {
        type: 'value'
      },
      series: [
        {
          name:'项目一',
          type:'line',
          stack: '总量',
          data:[120, 132, 101, 134, 90, 230]
        },
        {
          name:'项目二',
          type:'line',
          stack: '总量',
          data:[220, 182, 191, 234, 290, 330]
        },
        {
          name:'项目三',
          type:'line',
          stack: '总量',
          data:[150, 232, 201, 154, 190, 330]
        },
        {
          name:'项目四',
          type:'line',
          stack: '总量',
          data:[320, 332, 301, 334, 390, 330]
        },
        {
          name:'项目五',
          type:'line',
          stack: '总量',
          data:[340, 432, 321, 374, 360, 320]
        },
        {
          name:'项目六',
          type:'line',
          stack: '总量',
          data:[320, 352, 401, 304, 340, 370]
        }
      ]
    };
    myChart.setOption(option);
  }, 500);

  // 各个任务中项目部得分占比情况 饼状图
  $timeout(function() {
    var option = {
      tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      color: ['#fe6f4d', '#fdc638', '#2de88e', '#a8a8a8', '#44cede', '#299be4'],
      legend: {
        top:20,
        data: ['任务一','任务二','任务三','任务四','任务五','任务六']
      },
      series : [
        {
          name:'得分占比',
          type: 'pie',
          radius: ['35%', '55%'],
          center: ['50%', '60%'],
          data:[
            {value:335, name:'任务一'},
            {value:310, name:'任务二'},
            {value:234, name:'任务三'},
            {value:135, name:'任务四'},
            {value:1548, name:'任务五'},
            {value:869, name:'任务六'}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('department-score'));
    myChart.setOption(option);
  }, 500);

// 各个任务中项目部得分情况 子 饼状图
  $timeout(function() {
    var option = {
      tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      color: ['#fe6f4d', '#fdc638'],
      legend: {
        top:40,
        data: ['项目一','项目二']
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      series : [
        {
          name:'得分占比',
          type: 'pie',
          radius: ['25%', '40%'],
          center: ['50%', '60%'],
          data:[
            {value:335, name:'项目一'},
            {value:310, name:'项目二'}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('department-score-son'));
    myChart.setOption(option);
  }, 500);

  // 日常巡查各个安全员巡查情况 柱状图
  setTimeout(function() {
    let option = {
      color: ['#fe7d5d','#6dcce3'],
      title : {
        text: '项目部门日常巡查次数月情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      tooltip : {
        trigger: 'axis'
      },
      legend: {
        data:['日常巡查','重点巡查'],
        left:20,
        top:20
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      xAxis : [
        {
          type : 'category',
          data : ['项目一','项目二','项目三','项目四','项目五','项目六']
        }
      ],
      yAxis : [
        {
          type : 'value',
        }
      ],
      series : [
        {
          name:'重点巡查',
          type:'bar',
          stack: '全部',
          barWidth : 30,
          data:[150, 232, 201, 154, 190, 330]
        },
        {
          name:'日常巡查',
          type:'bar',
          stack: '全部',
          barWidth : 30,
          data:[120, 132, 101, 134, 90, 230],
          markPoint : {
            data : [
              {type : 'max', name: '最大值'},
              {type : 'min', name: '最小值'}
            ]
          },
          markLine : {
            data : [
              {type : 'average', name: '平均值'}
            ]
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('department-inspect'));
    myChart.setOption(option);
  }, 500);

  // 各个项目部日常巡查占比情况 饼状图
  $timeout(function() {
    var option = {
      tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      title : {
        text: '各个项目部日常巡查占比情况',
        x:'center',
        textStyle: {color: '#666'}
      },
      color: ['#fe6f4d', '#fdc638', '#2de88e', '#a8a8a8', '#44cede', '#299be4'],
      legend: {
        top:40,
        data: ['项目一','项目二','项目三','项目四','项目五','项目六']
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      series : [
        {
          name:'得分占比',
          type: 'pie',
          radius: ['35%', '55%'],
          center: ['50%', '60%'],
          data:[
            {value:335, name:'项目一'},
            {value:310, name:'项目二'},
            {value:234, name:'项目三'},
            {value:135, name:'项目四'},
            {value:1548, name:'项目五'},
            {value:869, name:'项目六'}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('department-inspect-accounted'));
    myChart.setOption(option);
  }, 500);

  // 日常重点巡查占比情况 饼状图
  $timeout(function() {
    var option = {
      tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      color: ['#fe6f4d', '#fdc638', '#2de88e', '#a8a8a8', '#44cede', '#299be4'],
      legend: {
        top:40,
        data: ['任务一','任务二','任务三','任务四','任务五','任务六']
      },
      title : {
        text: '任务占比',
        x:'center',
        top:160,
        textStyle: {color: '#666'}
      },
      series : [
        {
          name:'得分占比',
          type: 'pie',
          radius: ['35%', '55%'],
          center: ['50%', '60%'],
          data:[
            {value:335, name:'任务一'},
            {value:310, name:'任务二'},
            {value:234, name:'任务三'},
            {value:135, name:'任务四'},
            {value:1548, name:'任务五'},
            {value:869, name:'任务六'}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('important-patrol0'));
    myChart.setOption(option);
  }, 500);

// 日常重点巡查占比情况 子 饼状图
  $timeout(function() {
    var option = {
      tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
      },
      color: ['#fe6f4d', '#fdc638'],
      legend: {
        top:40,
        data: ['安全人员一','安全人员二']
      },
      toolbox: {
        show : true,
        feature : {
          dataView : {show: true, readOnly: false},
          magicType : {show: true, type: ['line', 'bar']},
          restore : {show: true},
          saveAsImage : {show: true}
        }
      },
      calculable : true,
      series : [
        {
          name:'得分占比',
          type: 'pie',
          radius: ['25%', '40%'],
          center: ['50%', '60%'],
          data:[
            {value:335, name:'安全人员一'},
            {value:310, name:'安全人员二'}
          ],
          itemStyle: {
            emphasis: {
              shadowBlur: 10,
              shadowOffsetX: 0,
              shadowColor: 'rgba(0, 0, 0, 0.5)'
            }
          }
        }
      ]
    };
    let myChart = echarts.init(document.getElementById('important-patrol-son0'));
    myChart.setOption(option);
  }, 500);


}

export default statisticAnalyzeCtrl;